#include <iostream>
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
#include <unistd.h>
void handle(int x)
{
    
}
using namespace std;
int main()
{
    int ret = fork();
    if (ret == 0)
    {
        int a = 10;
        a /= 0;
        exit(0);
    }
    int status=0;
    waitpid(ret,&status,0);
    cout<<"signal:"<<(status&(0x7F))<<endl;
    cout<<"core:"<<((status>>7)&0x1)<<endl;
    cout<<"node:"<<((status>>8)&(0xFF))<<endl;
    return 0;
}